<?php 
$this->load->view('common/header');
$this->load->view('common/head');
?>
<script type="text/javascript" src="<?php echo ASSET_URL; ?>js/jquery-1.10.2.js"></script>
<script type="text/javascript" >    
$(document).ready(function(){
$("#forgot_btn").click(function(){
var email_pattern=/^[_A-Za-z0-9-]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(\.[A-Za-z]{2,12})$/;
if($("#emailid").val() =="")
	{
	$('#err-email').html('Please enter Email');
	$('#err-email').show(500);
	$('#err-email').delay(4000);
	$('#err-email').animate({
	height: 'toggle' 
	}, 500, function() {
	// Animation complete.
	});
	$("#emailid").focus();
	}
else if(!email_pattern.test($("#emailid").val()))
	{
	$('#err-email').html('Please enter a valid email');
	$('#err-email').show(500);
	$('#err-email').delay(4000);
	$('#err-email').animate({
	height: 'toggle' 
	}, 500, function() {
	// Animation complete.
	});
	$("#emailid").focus();
	}

else
		{	$("#forgot_password_form").submit();
		}
});
});

</script>
<style>
.forgot_err{ color:red; }
.forgot_message{ color:green; } 
</style>
<img src="<?php echo ASSET_URL.'img/contact/03.jpg'?>" alt="">  

<div class="space40"></div>

  <div class="container">
    <div class="row"> 
      <div class="col-md-12">
        <h1>Get Back into your account</h1>
		<p class="text-center">To reset your password, enter the Email ID you use to sign in to Dashboard. Activation code will be sent to the registered Email ID.</p>
      </div>
    </div>    
  </div>    
  
  <div class="space20"></div>  
  
  <div class="container">
    <div class="row"> 
       
      <div class="center-block2">  
        
        <!--<h4>Contact Form</h4>   --> 
        <!-- Form -->
        <form role="form" id="forgot_password_form" action="" method="post" class="contact-form">
          <div class="row">
          	<div class="form-group col-sm-12">
              <label for="email2">E-mail</label>
              <input  class="form-control" id="emailid" name="email"  type="text" value="" placeholder="Email" required onBlur="this.value=jQuery.trim(this.value)">
              <div class="error" id="err-email"></div> 
            </div>   
          </div>
          <div class="row">            
            <div class="col-md-12 text-center">
            <span class="forgot_err"><?php  echo $this->session->userdata('forgot_error'); $this->session->unset_userdata('forgot_error');  ?></span>
            <span class="forgot_message"><?php  echo $this->session->userdata('forgot_message'); $this->session->unset_userdata('forgot_message');?></span>
              <div class="error" id="err-form">There was a problem validating the form please check!</div>
              <div class="error" id="err-timedout">The connection to the server timed out!</div>
              <div class="error" id="err-state"></div>                 
               <button type="button" class="btn btn-primary submit_btn" id="forgot_btn" style="float:right;">Submit</button>
               <div class="clearfix"></div>
            </div>
          </div>
        </form>   
        <!-- Form End -->
          
      </div>    

    </div> 
  </div> 
  
  <div class="space30"></div>  
  <?php $this->load->view('common/footer') ?>  